import 'package:cbec_app/utils/ImageHelper.dart';
import 'package:flutter/cupertino.dart';

///基础图标,基于纯色图片扩展
class BaseIcon extends StatelessWidget {
  ///图标地址（直接传入图片名称即可）
  final String url;

  ///图标尺寸
  final double? size;

  ///图标颜色
  final Color? color;

  const BaseIcon({super.key, required this.url, this.size, this.color});

  @override
  Widget build(BuildContext context) {
    return ImageIcon(
      ImageHelper.imgProvider(url),
      size: size,
      color: color,
    );
  }
}
